home *** CD-ROM | disk | FTP | other *** search
- Path: news.Stanford.EDU!not-for-mail
- From: reckdahl@leland.Stanford.EDU (Keith Reckdahl)
- Newsgroups: comp.lang.c
- Subject: Re: Unbuffered character input...
- Date: 2 Feb 1996 14:15:25 -0800
- Organization: Stanford University, CA 94305, USA
- Message-ID: <4eu2dt$pm2@elaine18.Stanford.EDU>
- References: <Pine.SGI.3.91.960129190205.27936A-100000@tahiti.cs.unm.edu> <4elf0t$5vd@ixnews2.ix.netcom.com> <4ep3a1$bee@hacgate2.hac.com>
- NNTP-Posting-Host: elaine18.stanford.edu
-
- Ron Collins <collins@thor.tu.hac.com> wrote:
- >: >Just curious--is there a way to do unbuffered character input
- >: >in c? i.e. getting just one character without waiting for a
- >: >carriage return (enter)...
- >
- >There is no portable way to get unbuffered input, since C can't
- >possibly know all about the dozens or hundreds of different
- >terminal types available on all the machines made around the world.
-
-
- I understand that it is hard to make I/O code portable, but
- is it truly *impossible* for C to have a portable unbuffered
- input function? Currently C has functions for many other
- hard-to-port capabilities such as system calls and process
- spawning. The actual system-dependent details are left to
- the compiler writers to figure out.
-
- Wouldn't it possible to define an ANSI-standard unbuffered
- input function and then let the compiler people deal with
- the individual system details?
-
- This makes more sense than forcing each individual
- programmer to re-invent the wheel by writing their own
- portable unbuffered input function.
-
- Keith
-
-